package com.xiaodao.zk;

import com.xiaodao.zk.service.ZkService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.FileNotFoundException;
import java.util.List;

@SpringBootApplication
public class ZkApplication {

    public static void main(String[] args) {
        try {
            ZkService zkService =new ZkService();
           List<String> list = zkService.getChildren("/");
            for (String item:list) {
                zkService.lister("/"+item);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        SpringApplication.run(ZkApplication.class, args);
    }
}
